USE [SRD]
GO

/****** Object:  Table [dbo].[DESPESA_KM]    Script Date: 05/14/2011 11:03:15 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[DESPESA_KM](
	[DESPESA_ID] [int] NOT NULL,
	[ORIGEM] [nvarchar](30) NOT NULL,
	[DESTINO] [nvarchar](30) NOT NULL,
	[KM] [int] NOT NULL,
	[DATA] [datetime] NOT NULL,
 CONSTRAINT [PK_DESPESA_KM] PRIMARY KEY CLUSTERED 
(
	[DESPESA_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[DESPESA_KM]  WITH CHECK ADD  CONSTRAINT [FK_DESPESA_KM_DESPESA] FOREIGN KEY([DESPESA_ID])
REFERENCES [dbo].[DESPESA] ([DESPESA_ID])
GO

ALTER TABLE [dbo].[DESPESA_KM] CHECK CONSTRAINT [FK_DESPESA_KM_DESPESA]
GO


